<div class="users index">
	<h2><?php echo "Bienvenue , ". ucfirst($session->read('Auth.User.firstname'));?></h2>
	<p>Vos options :</p>
	
	<?php
		echo $this->Html->link(__('Gerer votre profil', true), array('action' => 'view', $session->read('Auth.User.id')));
		switch($session->read('Auth.User.privilege_id'))
		{
			case "1":
				echo "<br />";
				echo $this->Html->link(__('Gerer vos CV', true), array('controller' => 'cvs', 'action' => 'user', $session->read('Auth.User.id')));
				break;
			case "2":
				break;
			case "3":
				echo $this->Html->link(__('Consulter les CV des etudiants', true), array('controller' => 'cvs', 'action' => 'index'));
				break;
		}
	?>
	
	<table cellpadding="0" cellspacing="0">
	<tr>
		<!--	<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('lastname');?></th>
			<th><?php echo $this->Paginator->sort('firstname');?></th>
			<th><?php echo $this->Paginator->sort('email');?></th>
			<th><?php echo $this->Paginator->sort('password');?></th>
			<th><?php echo $this->Paginator->sort('birthday');?></th>
			<th><?php echo $this->Paginator->sort('city');?></th>
			<th><?php echo $this->Paginator->sort('zipcode');?></th>
			<th><?php echo $this->Paginator->sort('address');?></th>
			<th><?php echo $this->Paginator->sort('phone');?></th>
			<th><?php echo $this->Paginator->sort('created');?></th>
			<th><?php echo $this->Paginator->sort('modified');?></th>
			<th><?php echo $this->Paginator->sort('privilege_id');?></th>
			
			<th class="actions"><?php __('Actions');?></th> -->
	</tr>
	<?php
	$i = 0;
	foreach ($users as $user):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<!--<td><?php echo $user['User']['id']; ?>&nbsp;</td>
		<td><?php echo $user['User']['lastname']; ?>&nbsp;</td>
		<td><?php echo $user['User']['firstname']; ?>&nbsp;</td>
		<td><?php echo $user['User']['email']; ?>&nbsp;</td>
		<td><?php echo $user['User']['password']; ?>&nbsp;</td>
		<td><?php echo $user['User']['birthday']; ?>&nbsp;</td>
		<td><?php echo $user['User']['city']; ?>&nbsp;</td>
		<td><?php echo $user['User']['zipcode']; ?>&nbsp;</td>
		<td><?php echo $user['User']['address']; ?>&nbsp;</td>
		<td><?php echo $user['User']['phone']; ?>&nbsp;</td>
		<td><?php echo $user['User']['created']; ?>&nbsp;</td>
		<td><?php echo $user['User']['modified']; ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($user['Privilege']['id'], array('controller' => 'privileges', 'action' => 'view', $user['Privilege']['id'])); ?>
		</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View', true), array('action' => 'view', $user['User']['id'])); ?>
			<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $user['User']['id'])); ?>
			<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $user['User']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $user['User']['id'])); ?>
		</td> -->
	</tr>
<?php endforeach; ?>
	</table>
	<p> <!--
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>-->
</div>
<!--
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New User', true), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Privileges', true), array('controller' => 'privileges', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Privilege', true), array('controller' => 'privileges', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Cvs', true), array('controller' => 'cvs', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Cv', true), array('controller' => 'cvs', 'action' => 'add')); ?> </li>
	</ul>
</div> -->